import { Application } from 'egg';

export default (app: Application) => {
  const { controller, router } = app;

  router.post('/api/user', controller.home.getPerson); // getJoke
  router.post('/api/joke', controller.home.getJoke);
  router.post('/api/login', controller.home.login);
  router.post('/api/getUserInfo', controller.home.getUserInfo);
  router.post('/api/loginCallBack', controller.home.callback);
  router.post('/api/getUser', controller.home.getUser);
  router.post('/api/addUser', controller.home.addUser);
  router.get('*', controller.home.index);
};
